import { observable, action } from "mobx"

class UdMainPageTabsStore {
  @observable
  pageTabs: any[] = sessionStorage.getItem("pageTabs")?JSON.parse(sessionStorage.getItem("pageTabs")):[]

  @action
  setPageTabs (tabs) {
    this.pageTabs = tabs
  }
}

export interface IUdMainPageTabsStore {
  pageTabs: any[]
  setPageTabs: (tabs) => void
}

const udMainPageTabsStore: IUdMainPageTabsStore = new UdMainPageTabsStore()

export default udMainPageTabsStore
